﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace MyClass.PageHelper
{
    /// <summary>
    /// 数据分类接口
    /// </summary>
    public interface IDataPager
    {
        /// <summary>
        /// 当前页
        /// </summary>
        int Cur { get; set; }
        /// <summary>
        /// 页的大小
        /// </summary>
        int Size { get; }
        /// <summary>
        /// 数据内容
        /// </summary>
        DataTable Dt { get; }
        /// <summary>
        /// 总页数
        /// </summary>
        int TotalCount { get;  }
        /// <summary>
        /// 获取当页数据
        /// </summary>
        /// <param name="cur">当前页</param>
        /// <returns>当前面内容</returns>
        DataSet GetCurrentPageData(int cur);
        /// <summary>
        /// 获取当页数据
        /// </summary>
        /// <param name="cur">当前页</param>
        /// <returns>当前面内容</returns>
        DataSet GetCurrentPageData(int cur, out int totalCount);
    }
}
